<?php
namespace app\common\behavior;
use think\Request;
class CORS {
    public function appInit($params){
        header('Access-Control-Allow-Origin: *');
        header('Access-Control-Allow-Methods: *');
        header("Access-Control-Allow-Headers: *");
		header('Access-Control-Expose-Headers: access-token, Authorization');
		header('Access-Control-Max-Age: 86400');
        if(Request()->isOptions()){
            exit();
        }
    }
}
